package com.wlstock.funi.utils;

import android.content.Intent;
import android.os.Bundle;

import com.wlstock.funi.model.MyAccountStocks;

public class IntentUtils {

	public static void configWithOwnstock(Intent intent, MyAccountStocks ownStock, int tradeType){
		
		Bundle bundle = new Bundle();
		bundle.putString(IntentContants.INTENT_STKCODE, ownStock.getStkCode());
		bundle.putString(IntentContants.INTENT_STKNAME, ownStock.getStkName());
		bundle.putInt(IntentContants.INTENT_TRADE_TYPE, tradeType);
		bundle.putFloat(IntentContants.INTENT_CUR_PRICE, Float.valueOf(ownStock.getCurPrice()));
		bundle.putFloat(IntentContants.INTENT_TRADE_MONEY, Float.valueOf(ownStock.getCurPrice())*ownStock.getStkQty());
		bundle.putInt(IntentContants.INTENT_TRADE_QTY, ownStock.getStkQty());
		bundle.putInt(IntentContants.INTENT_POP_MODE, IntentContants.INTENT_POP_MODE_IMG);
		intent.putExtras(bundle);
		
	}
	
}
